<!DOCTYPE html>
<html lang="">
  <head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width,initial-scale=1.0" />
    <link rel="icon" href="<%= BASE_URL %>favicon.ico" />
    <title><%= htmlWebpackPlugin.options.title %></title>
    <script>
      //hex -> rgb
      function hexToRgb(hex) {
        return (
          "rgb(" +
          parseInt("0x" + hex.slice(1, 3)) +
          "," +
          parseInt("0x" + hex.slice(3, 5)) +
          "," +
          parseInt("0x" + hex.slice(5, 7)) +
          ")"
        );
      }

      //hex -> rgba
      function hexToRgba(hex, opacity) {
        return (
          "rgba(" +
          parseInt("0x" + hex.slice(1, 3)) +
          "," +
          parseInt("0x" + hex.slice(3, 5)) +
          "," +
          parseInt("0x" + hex.slice(5, 7)) +
          "," +
          opacity +
          ")"
        );
      }
      
      //返回当前元素的真实位置
      function getRealXY(el){
        var top = el.offsetTop || 0
        var left = el.offsetLeft || 0
        var cur = el.parentNode
        while(typeof cur.offsetLeft != 'undefined'){
          top += cur.offsetTop || 0
          left += cur.offsetLeft || 0
          cur=cur.parentNode
        }
        return {top,left}
      }
    </script>
  </head>
  <body>
    <noscript>
      <strong
        >We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work
        properly without JavaScript enabled. Please enable it to
        continue.</strong
      >
    </noscript>
    <div id="app"></div>
    <!-- built files will be auto injected -->
  </body>
</html>
